import request from '@/utils/request'

// 查询还款计划列表
export function listSchedule(query) {
  return request({
    url: '/fs/schedule/list',
    method: 'get',
    params: query
  })
}

// 查询还款计划详细
export function getSchedule(id) {
  return request({
    url: '/fs/schedule/' + id,
    method: 'get'
  })
}

// 新增还款计划
export function addSchedule(data) {
  return request({
    url: '/fs/schedule',
    method: 'post',
    data: data
  })
}

// 修改还款计划
export function updateSchedule(data) {
  return request({
    url: '/fs/schedule',
    method: 'put',
    data: data
  })
}

// 删除还款计划
export function delSchedule(id) {
  return request({
    url: '/fs/schedule/' + id,
    method: 'delete'
  })
}

// 统计还款计划
export function getStatistic(year, month) {
  return request({
    url: '/fs/schedule/statistic/' + year + "/" + month,
    method: 'get'
  })
}
// 修改状态
export function eidtZt(id, zt) {
  return request({
    url: '/fs/schedule/zt/' + id + "/" + zt,
    method: 'get'
  })
}
